<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/payment.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
    </div>
    <div class="content">
	    <div id="tabs" class="htabs">
	    	<a tab="#tab-general"><?php echo $tab_general; ?></a>
	    	<a tab="#tab-design"><?php echo $tab_design; ?></a>
	    	<a tab="#tab-security"><?php echo $tab_security; ?></a>
	    </div>
	    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
		    <div id="tab-general">
		        <table class="form">
		          <tr>
		            <td><span class="required">*</span> <?php echo $entry_pspid; ?></td>
		            <td><input type="text" name="ogone_pspid" value="<?php echo $ogone_pspid; ?>" />
		              <?php if ($error_pspid) { ?>
		              <span class="error"><?php echo $error_pspid; ?></span>
		              <?php } ?></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_mode; ?></td>
		            <td><select name="ogone_mode">
		                <?php if ($ogone_mode == 'test') { ?>
		                <option value="test" selected="selected"><?php echo $text_test; ?></option>
		                <?php } else { ?>
		                <option value="test"><?php echo $text_test; ?></option>
		                <?php } ?>
		                <?php if ($ogone_mode == 'live') { ?>
		                <option value="live" selected="selected"><?php echo $text_live; ?></option>
		                <?php } else { ?>
		                <option value="live"><?php echo $text_live; ?></option>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_transaction; ?></td>
		            <td><select name="ogone_transaction">
		                <?php if ($ogone_transaction == 'SAL') { ?>
		                <option value="SAL" selected="selected"><?php echo $text_payment; ?></option>
		                <?php } else { ?>
		                <option value="SAL"><?php echo $text_payment; ?></option>
		                <?php } ?>
		                <?php if ($ogone_transaction == 'RES') { ?>
		                <option value="RES" selected="selected"><?php echo $text_authorization; ?></option>
		                <?php } else { ?>
		                <option value="RES"><?php echo $text_authorization; ?></option>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_total; ?></td>
		            <td><input type="text" name="ogone_total" value="<?php echo $ogone_total; ?>" /></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_authorized_status; ?></td>
		            <td><select name="ogone_authorized_status_id">
		                <?php foreach ($order_statuses as $order_status) { ?>
		                <?php if ($order_status['order_status_id'] == $ogone_authorized_status_id) { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
		                <?php } else { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
		                <?php } ?>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_authorization_waiting_status; ?></td>
		            <td><select name="ogone_authorization_waiting_status_id">
		                <?php foreach ($order_statuses as $order_status) { ?>
		                <?php if ($order_status['order_status_id'] == $ogone_authorization_waiting_status_id) { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
		                <?php } else { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
		                <?php } ?>
		                <?php } ?>
		              </select></td>
		          </tr>
		           <tr>
		            <td><?php echo $entry_captured_status; ?></td>
		            <td><select name="ogone_captured_status_id">
		                <?php foreach ($order_statuses as $order_status) { ?>
		                <?php if ($order_status['order_status_id'] == $ogone_captured_status_id) { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
		                <?php } else { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
		                <?php } ?>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_payment_processing_status; ?></td>
		            <td><select name="ogone_payment_processing_status_id">
		                <?php foreach ($order_statuses as $order_status) { ?>
		                <?php if ($order_status['order_status_id'] == $ogone_payment_processing_status_id) { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
		                <?php } else { ?>
		                <option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
		                <?php } ?>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_log; ?></td>
		            <td><select name="ogone_log">
		                <?php if ($ogone_log) { ?>
		                <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
		                <option value="0"><?php echo $text_disabled; ?></option>
		                <?php } else { ?>
		                <option value="1"><?php echo $text_enabled; ?></option>
		                <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_geo_zone; ?></td>
		            <td><select name="ogone_geo_zone_id">
		                <option value="0"><?php echo $text_all_zones; ?></option>
		                <?php foreach ($geo_zones as $geo_zone) { ?>
		                <?php if ($geo_zone['geo_zone_id'] == $ogone_geo_zone_id) { ?>
		                <option value="<?php echo $geo_zone['geo_zone_id']; ?>" selected="selected"><?php echo $geo_zone['name']; ?></option>
		                <?php } else { ?>
		                <option value="<?php echo $geo_zone['geo_zone_id']; ?>"><?php echo $geo_zone['name']; ?></option>
		                <?php } ?>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_status; ?></td>
		            <td><select name="ogone_status">
		                <?php if ($ogone_status) { ?>
		                <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
		                <option value="0"><?php echo $text_disabled; ?></option>
		                <?php } else { ?>
		                <option value="1"><?php echo $text_enabled; ?></option>
		                <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
		                <?php } ?>
		              </select></td>
		          </tr>
		          <tr>
		            <td><?php echo $entry_sort_order; ?></td>
		            <td><input type="text" name="ogone_sort_order" value="<?php echo $ogone_sort_order; ?>" size="1" /></td>
		          </tr>
		        </table>
	        </div>
			<div id="tab-security">
				<table class="form">
					<tr>
						<td><?php echo $entry_sha_method; ?></td>
						<td>
							<select name="ogone_sha_method">
								<option value="<?php echo $text_sha1; ?>" <?php echo ($ogone_sha == $text_sha1) ? 'selected="selected"' : ''; ?> ><?php echo $text_sha1; ?></option>
								<option value="<?php echo $text_sha256; ?>" <?php echo ($ogone_sha == $text_sha256) ? 'selected="selected"' : ''; ?>><?php echo $text_sha256; ?></option>
								<option value="<?php echo $text_sha512; ?>" <?php echo ($ogone_sha == $text_sha512) ? 'selected="selected"' : ''; ?>><?php echo $text_sha512; ?></option>
							</select>
						</td>
					</tr>
					<tr>
						<td><span class="required">*</span> <?php echo $entry_passphrase_in; ?></td>
						<td><input type="text" name="ogone_passphrase_in" value="<?php echo $ogone_passphrase_in; ?>" />
						<?php if ($error_passphrase_in) { ?>
		              	<span class="error"><?php echo $error_passphrase_in; ?></span>
		              	<?php } ?></td> 
					</tr>
					<tr>
						<td><span class="required">*</span> <?php echo $entry_passphrase_out; ?></td>
						<td><input type="text" name="ogone_passphrase_out" value="<?php echo $ogone_passphrase_out; ?>" /> 
						<?php if ($error_passphrase_out) { ?>
		              	<span class="error"><?php echo $error_passphrase_out; ?></span>
		              	<?php } ?></td> 
					</tr>
				</table>	
			</div>
	        <div id="tab-design">
	        	  <table class="form">
	        	  	<tr>
	        	  		<td><?php echo $entry_title?></td>
	        	  		<td><input type="text" name="ogone_title" value="<?php echo $ogone_title; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_bgcolor?></td>
	        	  		<td><input type="text" name="ogone_bgcolor" value="<?php echo $ogone_bgcolor; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_txtcolor?></td>
	        	  		<td><input type="text" name="ogone_txtcolor" value="<?php echo $ogone_txtcolor; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_tblbgcolor?></td>
	        	  		<td><input type="text" name="ogone_tblbgcolor" value="<?php echo $ogone_tblbgcolor; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_tbltxtcolor?></td>
	        	  		<td><input type="text" name="ogone_tbltxtcolor" value="<?php echo $ogone_tbltxtcolor; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_buttonbgcolor?></td>
	        	  		<td><input type="text" name="ogone_buttonbgcolor" value="<?php echo $ogone_buttonbgcolor; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_buttontxtcolor?></td>
	        	  		<td><input type="text" name="ogone_buttontxtcolor" value="<?php echo $ogone_buttontxtcolor; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_fonttype?></td>
	        	  		<td><input type="text" name="ogone_fonttype" value="<?php echo $ogone_fonttype; ?>" /></td>
	        	  	</tr>
	        	  	<tr>
	        	  		<td><?php echo $entry_logo?></td>
	        	  		<td><input type="checkbox" name="ogone_logo" value="<?php echo $ogone_logo; ?>" /></td>
	        	  	</tr>
	        	  </table>
	        </div>
      </form>
    </div>
  </div>
</div>
<script type="text/javascript"><!--
$.tabs('#tabs a');
//--></script> 
<?php echo $footer; ?> 